/*
 * @Date: 2022-05-11 20:39:03
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-05-18 10:20:45
 * @FilePath: \react-lvyou\src\main.tsx
 * @Description: something
 */
import React, { Suspense } from "react";
import { Spin } from "antd";
import { Provider } from "react-redux";
import ReactDOM from "react-dom/client";
import App from "./App";
import { BrowserRouter } from "react-router-dom";
import "./index.css";
import "antd/dist/antd.css";
import "./i18n/configs";
import rootStore from "./store";
import { PersistGate } from "redux-persist/integration/react";
ReactDOM.createRoot(document.getElementById("root")!).render(
  // <React.StrictMode>
  <BrowserRouter>
    <Suspense fallback={<Spin></Spin>}>
      <Provider store={rootStore.store}>
        <PersistGate loading={null} persistor={rootStore.persistor}>
          <App />
        </PersistGate>
      </Provider>
    </Suspense>
  </BrowserRouter>,
  // </React.StrictMode>,
);
